<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>H5+JS+CSS3实现七夕言情（代码封装）</title>
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-3.2.1.js"></script>
    <script src="js/swipe.js"></script>
</head>
<body>
    <div id="content">
        <ul id="content-wrap">
            <li>页面1</li>
            <li>页面2</li>
            <li>页面3</li>
        </ul>
        <div class="button">
            <button>点击切换页面</button>
        </div>
    </div>

    <script>

        var swipe= Swipe($("#content"));

        $(".button").click(function() {
            // 调用接口
            swipe.scrollTo($("#content").width()*2, 5000);
        });

    </script>
</body>
</html>